<?php
return  [
    'default' => env('DB_CONNECTION', 'mysql'),
    'connections' => [
        'mysql' => [
            'driver'      => 'mysql',
            'host'        => env('MYSQL_HOST', '127.0.0.1'),
            'port'        => env('MYSQL_PORT', '3306'),
            'database'    => env('MYSQL_DATABASE', 'your_database'),
            'username'    => env('MYSQL_USERNAME', 'your_username'),
            'password'    => env('MYSQL_PASSWORD', 'your_password'),
            'charset'     => env('MYSQL_CHARSET', 'utf8mb4'),
            'collation'   => env('MYSQL_COLLATION', 'utf8mb4_general_ci'),
            'prefix'      => env('MYSQL_PREFIX', ''),
            'strict'      => true,
            'engine'      => null,
            'options'   => [
                PDO::ATTR_EMULATE_PREPARES => false, // Must be false for Swoole and Swow drivers.
            ],
            'pool' => [
                'max_connections' => env('MYSQL_POOL_MAX_CONNECTIONS', 5),
                'min_connections' => env('MYSQL_POOL_MIN_CONNECTIONS', 1),
                'wait_timeout' => env('MYSQL_POOL_WAIT_TIMEOUT', 3),
                'idle_timeout' => env('MYSQL_POOL_IDLE_TIMEOUT', 60),
                'heartbeat_interval' => env('MYSQL_POOL_HEARTBEAT_INTERVAL', 50),
            ],
        ],
    ],
];